/*
 * @Author: your name
 * @Date: 2021-09-01 18:52:28
 * @LastEditTime: 2021-09-01 19:22:22
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \briup\Web课后练习成果\ES5\正则表达式.js
 */
//手机号 13 15 17 18 19  11位
var pattern = /^(1)([3|5|7|8|9])(\d{9})$/g;
var str = "13789456354";
console.log(pattern.test(str)); //true
var str1 = "157462522364";
console.log(pattern.test(str1)); //false


//密码 长度8-16 不能是纯数字或纯字母 不能包含空格 区分大小写
var pattern1 = /^(\w{8-16}?!(\d{8-16})?!([A-Z|a-z])?\S)$/g;
var str2 = "2210A0000";
console.log(pattern1.test(str2));